package com.cloud.wms.ui.main.entity;

import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;

import java.util.List;

/**
 * @Author:Chen
 * @Date: 2021-01-19 16:50
 * @Description:
 */
public class PosEntity implements Parcelable {
    protected int amount;
    protected String posCode;
    protected long posID;

    public String getPosCode() {
        return posCode == null ? "" : posCode;
    }

    public void setPosCode(String posCode) {
        this.posCode = posCode;
    }

    public long getPosID() {
        return posID;
    }

    public void setPosID(long posID) {
        this.posID = posID;
    }

    public int getAmount() {
        return amount;
    }

    public void setAmount(int amount) {
        this.amount = amount;
    }

    public PosEntity() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.amount);
        dest.writeString(this.posCode);
        dest.writeLong(this.posID);
    }

    protected PosEntity(Parcel in) {
        this.amount = in.readInt();
        this.posCode = in.readString();
        this.posID = in.readLong();
    }

    public static final Creator<PosEntity> CREATOR = new Creator<PosEntity>() {
        @Override
        public PosEntity createFromParcel(Parcel source) {
            return new PosEntity(source);
        }

        @Override
        public PosEntity[] newArray(int size) {
            return new PosEntity[size];
        }
    };
}
